🐛 fix: prevent checkpoint timeout when running from home directory#1228
🐛 fix: prevent checkpoint timeout when running from home directory#1228mokbhai wants to merge 1 commit intopingdotgg:mainfrom
Conversation
When T3 is run from home directory, git add -A -- . times out because home directory contains thousands of files. This fix: - Detects home directory using homedir() from node:os - Skips checkpointing with warning log when cwd is home - Returns false for isGitRepository on home directories Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip You can disable the changed files summary in the walkthrough.Disable the |
Summary
homedir()fromnode:osfalseforisGitRepositoryon home directoriesChanges
This PR adds early detection of home directories to prevent the
git add -A -- .command from timing out. Home directories typically contain thousands of files (Applications, .npm, .cache, etc.) which makes staging extremely slow.The checkpoint system is designed for project-level work where git repositories have a manageable number of tracked files—not for entire home directories.
Files Modified
apps/server/src/checkpointing/Layers/CheckpointStore.ts:isHomeDirectory()helper functionisGitRepository()to returnfalsefor home directoriescaptureCheckpoint()to skip with warning for home directoriesTest Plan
npx tsc --noEmit)Checklist
Related Issue
Resolves #1227
Notes
This is a small, focused bug fix that aligns with the contribution guidelines:
If running from home directory, users should navigate to a project directory first (e.g.,
cd ~/my-project && npx t3).Note
Fix checkpoint timeout when running from the home directory
Running the app from the home directory could trigger a checkpoint timeout because git operations on
~are slow or hang.isGitRepositorynow short-circuits tofalseandcaptureCheckpointexits early with a warning log whencwdmatchesos.homedir(), skipping all git index and commit logic.Macroscope summarized 54c00d9.